﻿using System;
namespace Calculater_App
{
    class Calculater
    {
        static void Main(string[] args)
        {
            //输入
            Console.WriteLine("Press two numbers:");
            double num1 = Convert.ToDouble(Console.ReadLine());
            double num2 = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Press operater(+ - * / %):");
            char ch;
            double ans = 0;
            ch = (char)Console.Read();
            //选择运算符
            switch (ch)
            {
                case '+':
                    {
                        ans = num1 + num2;
                        break;
                    }
                case '-':
                    {
                        ans = num1 - num2;
                        break;
                    }
                case '*':
                    {
                        ans = num1 * num2;
                        break;
                    }
                case '/':
                    {
                        ans = num1 / num2;
                        break;
                    }
                case '%':
                    {
                        ans = num1 % num2;
                        break;
                    }
                default: break;
            }
            Console.WriteLine("Answer is " + ans);
            Console.ReadKey();
        }
    }
}